//
//  JSTabBar.m
//  jshop
//
//  Created by 张艳江 on 2019/4/29.
//  Copyright © 2019年 张艳江. All rights reserved.
//

#import "SCTabBar.h"

@implementation SCTabBar

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        // 去掉半透明
        self.translucent = NO;
        [self setShadowImage:[UIImage new]];
        // 添加阴影
        self.layer.shadowColor = [UIColor lightGrayColor].CGColor;//shadowColor阴影颜色
        self.layer.shadowOpacity = 0.2;//阴影透明度，默认0
        self.layer.shadowOffset = CGSizeMake(0,0);
        self.layer.shadowRadius = 2;//阴影半径，默认3
        UIBezierPath *path = [UIBezierPath bezierPath];
        
        [path moveToPoint:CGPointMake(0, -1)];
        [path addLineToPoint:CGPointMake(kScreenW, -1)];
        [path addLineToPoint:CGPointMake(kScreenW, 0.5)];
        [path addLineToPoint:CGPointMake(0, 0.5)];
        [path addLineToPoint:CGPointMake(0, -1)];
        
        self.layer.shadowPath = path.CGPath;
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    
}

@end
